<template>
    <div>
        <van-nav-bar :title="title" left-text="返回" left-arrow @click-left="($router.push('/home/index'))" />
        <van-tabs v-model:active="active">
            <van-tab title="商品">
                <lb :images="images" imagewidth="100%" imageheight="150px"></lb>
                <div v-html="detail.goods_introduce"></div>
                <van-action-bar>
                    <van-action-bar-icon icon="chat-o" text="客服" dot />
                    <van-action-bar-icon icon="cart-o" text="购物车" badge="5" />
                    <van-action-bar-icon icon="shop-o" text="店铺" badge="12" />
                    <van-action-bar-button type="warning" text="加入购物车" />
                    <van-action-bar-button type="danger" text="立即购买" />
                </van-action-bar>

            </van-tab>
            <van-tab title="详情">内容 2</van-tab>
            <van-tab title="评论">内容 3</van-tab>

        </van-tabs>


    </div>
</template>

<script setup>
import bt from '@/components/bt.vue';
import lb from '@/components/lb.vue';
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-5.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-6.jpeg',
];
const title = '详情'
import { ref } from 'vue';
import { detailApi } from '@/api/api';
let detail = ref([])
import { useRoute } from 'vue-router';
const route = useRoute()
detailApi(route.params.goods_id).then(res => {
    console.log('详情', res)
    detail.value = res.data.message
})


</script>

<style lang="scss" scoped></style>